package router

import (
	"github.com/gin-gonic/gin"
	"github.com/smash-llj/Nexa-server/api"
)

func InitFileRoutes() {
	//注册当前大模块到gfnRoutes里面
	RegisterRoute(func(rgPublic *gin.RouterGroup, tgAuth *gin.RouterGroup) {
		fileApi := api.NewFileApi()
		publicFileRouter(tgAuth, fileApi)
	})
}
func publicFileRouter(tgAuth *gin.RouterGroup, api api.FileApi) {
	tgAuth.GET("/getAllFile/:userId", api.GetAllMessageFile)
	tgAuth.POST("/searchMessageFile", api.SearchMessageFile)
	tgAuth.POST("/upload", api.Upload)
}
